/**
 * Copyright (C) 2013 AirChina
 *
 * @className:com.airchina.wechat.frontend.processor.main.Processor
 * @description:
 * 
 * @version:v1.0.0 
 * @author:larry
 * 
 * Modification History:
 * NO   Date         Author      Version     Description
 * -----------------------------------------------------------------
 *     2013-10-17     larry       v1.0.0        create
 *
 *
 */
package com.china.api.wechat.processor.main;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.china.api.wechat.FrontendConfig;
import com.china.api.wechat.processor.model.PictureMessage;



/**
 * @Description:处理器基础类，所有业务处理使用 public String method1(String content, Session session) 方式提供服务
 * 				【content为解析后的文本内容】，并使用@ActionPath进行注解
 * @author:larry
 * @version:v1.0.0
 * @Created:2013-10-17上午9:48:36
 * @Modified:
 */
public abstract class Processor {
	
	/**web应用地址*/
	public static final String URL = FrontendConfig.getURL();
	
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	
	protected TextResponse buildTextResponse(String userId, String content){
		return new TextResponse(userId, content);
	}

	// 生成图文响应
	protected PictureResponse buildPicResponse(String userId, List<PictureMessage> list) {
		return new PictureResponse(userId, list);
	}
	
	// 生成图片消息响应
	protected ImageResponse buildImageResponse(String userId, String mediaId){
		return new ImageResponse(userId, mediaId);
	}
}
